<?php TPL::output('global/header.tpl.htm'); ?>

<div class="i_bd mainElem i_clear i_allbg">
	<div class="i_left L_sidebar">
		<div class="t_topic_index i_prl q_congMain b_x4" style="height:30px;padding:0 20px 15px 275px">
			<h3 class="i_bdted i_prl">
			<!--   关注，编辑管理 按钮
                   <div class="q_rightBar i_pas">
						<?php if ($this->user_id) { ?><a class="i_green_bt2<?php if ($this->topic_info['has_focus']) { ?> cur<?php } ?>" href="javascript:" onclick="focus_topic($(this), $(this), <?php echo $this->topic_info['topic_id']; ?>);"><?php if ($this->topic_info['has_focus']) { ?>取消<?php } ?>关注</a><?php } ?><?php if ($this->user_info['permission']['is_administortar'] OR $this->user_info['permission']['is_moderator'] OR ($this->topic_info['topic_lock'] == 0 && $this->user_info['permission']['edit_topic'])) { ?><a onclick="$(this).siblings('.q_tipis').toggle();" class="q_setBtn" href="javascript:;"></a>
					<div class="i_data_list i_pas q_tipis" style="display: none;">
						<em class="i_arrows"></em>
						<p class="i_list_p"><a href="topic/edit/<?php echo $this->topic_info['topic_id']; ?>">编辑标签</a></p>
						<p class="i_list_p"><a href="topic/manage/<?php echo $this->topic_info['topic_id']; ?>">管理标签</a></p>
					</div><?php } ?>
					</div>
				 -->	
					<b><?php echo $this->special_info['title']; ?></b> </h3>
			<p class="i_txtBreak i_cl_01 tags_Mark"><?php echo $this->special_info['description']; ?></p>
			<a class="u_topicHead i_pas"><img style ="width:250px;height:100px;" src="<?php echo $this->special_info['img_url']; ?> " class="i_radiu5" alt="<?php echo $this->special_info['title']; ?>" title="<?php echo $this->special_info['title']; ?>"/></a>
 <div class="q_bElems" id ="button_q_bElems" style="position:static;">
		 <div id ="q_info_time"><?php echo date_friendly($this->special_info['date']); ?> </div>
		
		<!--<div id = "q_info_comment"><?php if (!$this->special_info['lock'] || ($this->special_info['comment_count'] > 0)) { ?>
		<a href="javascript:;" class="q_criticism" onclick="toggle_comments(<?php echo $this->question_id; ?>, 'question',this,$.Q.reCallarrows);"><?php echo $this->special_info['comment_count']; ?> 条评论</a>
		<?php } ?>
		</div>-->

			<div id ="q_info_share">
			<span class="q_participate i_prl">
				<a href="javascript:;" class="q_pate">分享</a>
				<div class="i_data_list i_pas">
					
					<em class="i_arrows"></em>
					
					<p class="i_list_p">
						<a href="javascript:;"class="q_wb" onClick="$.startQs({flgs:2,number:0,share_type:'special',target_id:<?php echo $this->special_info['id']; ?>});">站外</a>
					</p>
					<?php if ($this->user_id){ ?>
					<p class="i_list_p">
						<a href="javascript:;" class="q_letter" onClick="$.startQs({flgs:2,number:1,share_type:'special',target_id:<?php echo $this->special_info['id']; ?>});">私信</a>
					</p>
					<?php } ?>
					<p class="i_list_p">
						<a href="javascript:;" class="q_maill" onClick="$.startQs({flgs:2,number:2,share_type:'special',target_id:<?php echo $this->special_info['id']; ?>});">邮件</a>
					</p>
				</div>
			</span>
			</div>
			<div id ="q_info_edit">
			<?php if (($this->user_info['permission']['is_administortar'] OR $this->user_info['permission']['is_moderator']) OR ($val['uid'] == $this->user_id AND ((time() - $val['add_time']) < (get_setting('answer_edit_time') * 60) OR (!get_setting('answer_edit_time'))))) { ?><a class="q_edit" href="special/edit/special_id-<?php echo $this->special_info['id']; ?>#special">编辑</a><?php } ?>
			</div>
			<div id = "q_info_ip">
			<?php if (($this->user_info['permission']['is_administortar'] OR $this->user_info['permission']['is_moderator']) AND $this->special_info['ip']) { ?><a href="javascript:;" title="<?php echo long2ip($this->special_info['ip']); ?>" onclick="$.alert('系统记录的 IP 地址为: <?php echo long2ip($this->special_info['ip']); ?>');" class="q_ip">IP 地址</a><?php } ?>
			</div>
			<div id ="q_info_to_edit">
			<?php if ($this->special_info['unverified_modify_count']) { ?><a href="question/id-<?php echo $this->question_id; ?>__column-log__rf-false" class="q_modification">待确认修改<em class="i_message_tooltip_s i_hide"><?php echo $this->special_info['unverified_modify_count']; ?></em></a><?php } ?>				
			</div>
			<div id ="q_info_to_edit">
				<?php if (($this->user_info['permission']['is_administortar'] OR $this->user_info['permission']['is_moderator']) OR ($val['uid'] == $this->user_id AND ((time() - $val['add_time']) < (get_setting('answer_edit_time') * 60) OR (!get_setting('answer_edit_time'))))) { ?>
				<a class="q_edit" href="javascript:;" onclick="$.startQs({flgs:11,special_id:<?php echo $this->special_info['id']; ?>});">添加网站</a>
				<?php } ?>			
			</div>
			<!--<div id ="q_info_fuck">
			<?php if ($this->user_id) { ?>
				<a class="q_help i_prl" href="javascript:;" onClick="$.startQs({flgs:8,report_type:'question', target_id:<?php echo $this->special_info['question_id']; ?>})">举报站点</a>
			<?php } ?>
			</div>-->
			
			<div id ="q_info_thx">
			<?php if ($this->user_id != $this->special_info['published_uid'] AND $this->user_id) { ?>
				<a class="q_grateful i_prl" href="javascript:;" <?php if (!$this->question_thanks) { ?> onclick="question_thanks(<?php echo $this->special_info['question_id']; ?>, this);"<?php } ?>><?php if ($this->question_thanks) { ?>已<?php } ?>感谢<?php if (!$this->question_thanks) { ?><span class="i_tips_black i_pas i_hide"><em></em>感谢提问者</span><?php } ?></a>
				<?php } ?>
			</div>
		</div>           
		</div>
		<div class="b_restrain">
		<h3 class="latest_trendst_h3 q_qusAll i_prl q_content_h3 ">
			站点列表
		</h3>
		
		<div class="flx">
			
			
			<div id="v_Elem_2" class="i_hide_1">
				<!--内容填充 循环-->
				<div class="i_prl" id="c_noanswer_list">
				
					<?php if ($this->question_info_list) { ?>
						<?php if ($_GET['page'] == 0 AND count($this->question_info_list) > 0) { ?>
						<a class="main_latest" href="javascript:;" onclick="reload_list(0);" title="点击查看 »" id="new_actions_tip" style="display:none;"><span id="new_action_num"></span> 条新动态，点击查看</a> 
						
						<script type="text/javascript">
							if (typeof checkactionsnew_handle != 'undefined')
							{
								clearInterval(checkactionsnew_handle);
							}
							
							checkactionsnew_handle = setInterval(function () {
								check_actions_new('0', '<?php echo time(); ?>');
							}, 60000);
						</script>
						<?php } ?>
						<?php $id=0;?>
						<?php foreach ($this->question_info_list AS $key => $val) { ?>
						<?php $id++;?>
						<!--内容模块_s-->
						<div class="S_module" style ="height:120px;">
						 <!--用户头像--> 
						 <!--   <?php if ($val['anonymous'] == 0) { ?><a class="s_user i_alpHover" href="people/<?php echo $val['user_info']['url_token']; ?>"><img src="<?php echo get_avatar_url($val['user_info']['uid'], 'mid'); ?>" alt="<?php echo $val['user_info']['user_name']; ?>"  class="user_msg" data-message="&uid=<?php echo $val['user_info']['uid']; ?>&card=user" /></a><?php } else { ?><a href="javascript:;" class="s_user i_alpHover "><img src="<?php echo G_STATIC_URL; ?>/common/avatar-mid-img.jpg" alt="匿名用户" title="匿名用户" /></a><?php } ?> -->
						  <div>
						    <div style="width:100px;margin-right:1px;float:left">
						      <img alt="<?php echo $val['question_content']; ?>" src="<?php echo $val['question_img_url']; ?>" style ="width:90px;height:36px;">
						    </div>
						   <div style ="float:left;left:100px;top:50px;width:80%;margin-top:2px;">
						     <h4><a class="blank_link" href="question/<?php echo $val['question_id']; ?>#reply<?php echo $val['answer_count']; ?>"><?php echo $val['question_content']; ?></a></h4>
						    </div>  
						    
						   <div style="float:left">	 
						    <p class="s_ctrl" style="clear:both;">
						  	<?php if ($val['last_action_str']) { ?><?php echo $val['last_action_str']; ?> • <?php echo date_friendly($val['add_time']); ?> • <?php } ?><span class="i_gray"><a  href="question/<?php echo $val['question_id']; ?>#reply<?php echo $val['answer_count']; ?>"><?php echo $val['answer_count']; ?> 个回复</a> • <a href="javscript:;" class="gxz_b<?php if ($val['has_focus']) { ?> cur<?php } ?>" onclick="focus_question($(this), $(this), <?php echo $val['question_id']; ?>); return false;"><?php if ($val['has_focus']) { ?>取消<?php } ?>关注</a><?php if ($_GET['filter'] == 'focus') { ?> • <?php if ($val['topics']) { ?> 已添加到 <?php foreach($val['topics'] as $t_key => $t_val) { if ($t_key > 2) { break; } ?><a href="topic/<?php echo $t_val['url_token']; ?>" class="user_msg" data-message="&uid=<?php echo $t_val['topic_id']; ?>&card=topic"><?php echo $t_val['topic_title']; ?></a> <?php } ?><?php if (sizeof($val['topics']) > 3) { ?> 等 <?php echo sizeof($val['topics']); ?> 个<?php } ?>标签<?php } else { ?><a href="question/<?php echo $val['question_id']; ?>">添加标签</a><?php } ?></p><?php } else { ?> • <a href="javascript:;" onClick="question_uninterested($(this).parents('div.S_module'), <?php echo $val['question_id']; ?>)">不感兴趣</a><?php } ?>
                            <?php if (($this->user_info['permission']['is_administortar'] OR $this->user_info['permission']['is_moderator']) OR ($val['uid'] == $this->user_id AND ((time() - $val['add_time']) < (get_setting('answer_edit_time') * 60) OR (!get_setting('answer_edit_time'))))) { ?>
							<a class="q_edit" href="javascript:;" onclick="$.startQs({flgs:10,qs_id:<?php echo $this->question_qsid[$val['question_id']]; ?>});">编辑</a>
							<?php } ?>
                            </span>
						     </p>
                             <script type="text/javascript">
						/*	 $(document).ready(function() {
								$(".q_edit").click(function(){
									$("html,body").animate({scrollTop:1000},'slow');						
								});						
							 	
							  });*/
							 </script>
							<p>	
                                 <!--    评星插件 BEGIN    -->
                                 
                                <div id="star<?php echo $id;?>" style ="width:150px;"></div>
                                
                                 <!--    评星插件 END   -->
							</p>
							<p>
								<label><b>个人评论：</b></label>
								<div id="comment" ><?php echo $this->question_comment[$val['question_id']]; ?></div>
							</p>							 
						    </div>
						  </div>  
						  
						 	
							
						</div>
						<!--内容模块_e--> 
						<?php } ?>
						<?php if (sizeof($this->list) > 0) { ?>
						<script type="text/javascript">
						(function($){
							$('.blank_link').each(function(f) {
								var flg = $(this);
								flg.parent().find('a[class^="i_alink"]').length == 0 ?
						        $('<a/>')
								.addClass('i_alink i_small')
								.attr('title','新窗口打开')
								.attr('href',flg.attr('href'))
								.attr('target','_blank')
								.insertAfter(flg) :''; 
						    });
						})(jQuery);
						</script>
						<?php } ?>
						<?php } ?>
										
				
				
				</div>
				<!--内容填充 循环-->
				
				<p id="bp_noanswer_more"><a class="i_ajax_more" href="javascript:;" title="查看更多 »">更多...</a></p>
			</div>
		
		</div>
        </div>
	</div>

	<div class="R_sidebar"> 
			<div class="i_rightMain">
			<!-- 最新专辑 列表 -->
			<?php if (!empty($this->special_list_rand)) { ?>
			<div class="interest_user">
				<h3>最新专辑</h3>
				<?php foreach($this->special_list_rand as $special_info) { ?>
				<p class="q_xel">
					<a href="<?php echo  'special/explore/'.$special_info['id'] ?>" class="i_imgforUser"><img alt="<?php echo $special_info['title'] ;?>" src="<?php echo $special_info['img_url'] ?>" class="user_msg" /></a>
					<a href="<?php echo  'special/explore/'.$special_info['id'] ?>" class="q_uname"><?php echo $special_info['title']; ?></a>
				</p>
				<?php } ?>
			</div>
			<?php } ?>
		</div>
		</div>
	</div>
</div>
<script type="text/javascript">
function setStar(id,score){
	$('#star'+id).raty({
		start : score,			
		readOnly   : true,			
		hintList:  ['好烂呀', '不好用', 'soso啦', '不错哦', '给力，我喜欢'],
		path:"static/common/img", 
	/*	 start:"",
		 showHalf:  true,
		 target:'star_result',
		 targetKeep:true
	*/	 
	});

}
<?php $id=0;?>
<?php foreach ($this->question_info_list AS $key => $val) { ?>
<?php $id++;?>
	setStar(<?php echo $id;?>,<?php echo $this->question_score[$val['question_id']];?>);
<?php }?>	 

//$('.star').raty('readOnly', true);	
	

</script>
<script type="text/javascript">
	var TOPIC_ID = '<?php echo $this->topic_info['topic_id']; ?>';
	var TOPIC_TITLE = '<?php echo $this->topic_info['topic_title']; ?>';
</script>

<script type="text/javascript" src="<?php echo G_STATIC_URL; ?>/js/app/topic.js"></script>

<?php TPL::output('global/footer.tpl.htm'); ?>